package com.creative.accountsdk.net;

import android.content.Context;
import android.widget.Toast;

import com.creative.accountsdk.R;

import org.json.JSONArray;
import org.json.JSONObject;

import java.io.ByteArrayInputStream;

/**
 * Created by yinjialiang on 15-2-7.
 */
public class NetworkFailure {
    public static void handle(Context context, int statusCode, JSONArray errorResponse)
    {
//        Toast.makeText(context, "Failure statusCode = " + statusCode, Toast.LENGTH_SHORT).show();
        Toast.makeText(context, R.string.network_error, Toast.LENGTH_SHORT).show();
    }

    public static void handle(Context context, int statusCode, JSONObject errorResponse)
    {
//        Toast.makeText(context, "Failure statusCode = " + statusCode, Toast.LENGTH_SHORT).show();
        Toast.makeText(context, R.string.network_error, Toast.LENGTH_SHORT).show();
    }
}
